<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath()%>/js/easyui/themes/metro/easyui.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/validate/validate.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/easyui/easyui.js"></script>
<script type="text/javascript">
	$(function() {
		$("#sform").validate({
			rules : {
				merNo : {
					required : true
				},
				merName : {
					required : true
				},
				merLevel : {
					required : true
				},
				merEmail : {
					required : true
				},
				merInfo : {
					required : false
				},
				merIndustry : {
					required : true
				},
				merLink : {
					required : true
				},
				merCredential : {
					required : true
				},
				merNumber : {
					required : true
				},
				merPhone : {
					required : true
				},
				merQq : {
					required : true
				},
				merSource : {
					required : true
				},
				merAddr : {
					required : true
				}
			},
			errorPlacement : function(error, element) {
				element.css("border-color", "#1c3e57");
			},
		});
	});
</script>
</head>
<body>
	<div class="easyui-panel" title="编辑面板" style="width: 100%;" data-options="fit:true">
		<form id="sform" action="merchant_saveinfo.html" method="post" enctype="multipart/form-data">
			<table width="90%">
				<tr>
					<td height="30" align="right" width="200"><b></b></td>
					<td width="300"><b>内容</b></td>
					<td><b>说明</b></td>
				</tr>
				<tr>
					<td></td>
					<td colspan="2"><hr /></td>
				</tr>
				<tr>
					<td height="30" align="right">商户编号 :</td>
					<td><s:property value="merchantBean.merNo"/><input type="hidden" placeholder="商户编号" name="merNo" id="merNo" value="<s:property value="merchantBean.merNo"/>"  /></td>
					<td>固定为4位整数作为商编,请严格遵守此规则</td>
				</tr>
				<tr>
					<td height="30" align="right">名称 :</td>
					<td><input type="text" placeholder="名称" name="merName" id="merName" value="<s:property value="merchantBean.merName"/>"  style="width: 200px;"/></td>
					<td>商户公司名称或者个人姓名</td>
				</tr>
				<tr>
					<td height="30" align="right">商户类型 :</td>
					<td><s:select id="merLevel" name="merLevel" list="#{'直联商户':'直联商户','网站商户':'网站商户'}" value="merchantBean.merLevel" /></td>
					<td>目前只分直连商户和网站商户</td>
				</tr>
				<tr>
					<td height="30" align="right">邮箱 :</td>
					<td><input type="text" placeholder="邮箱" name="merEmail" id="merEmail" value="<s:property value="merchantBean.merEmail"/>" style="width: 200px;" /></td>
					<td>邮箱</td>
				</tr>
				<tr>
					<td height="30" align="right">简介 :</td>
					<td><input type="text" placeholder="简介" name="merInfo" id="merInfo" value="<s:property value="merchantBean.merInfo"/>" style="width: 200px;" /></td>
					<td>简介</td>
				</tr>
				<tr>
					<td height="30" align="right">所属行业 :</td>
					<td><s:select id="merIndustry" name="merIndustry" list="@dicts.IndustryDict@INDUSTRY_LIST" value="merchantBean.merIndustry" />
					</td>
					<td>所属行业</td>
				</tr>
			<tr>
					<td height="30" align="right">联系人 :</td>
					<td><input type="text" placeholder="联系人" name="merLink" id="merLink" value="<s:property value="merchantBean.merLink"/>" /></td>
					<td>联系人</td>
				</tr>
				<tr>
					<td height="30" align="right">证件类型 :</td>
					<td><s:select id="merCredential" name="merCredential" list="@dicts.CredentialDict@CREDENTIAL_LIST" value="merchantBean.merCredential" /></td>
					<td>证件类型</td>
				</tr>
				<tr>
					<td height="30" align="right">证件号 :</td>
					<td><input type="text" placeholder="证件号" name="merNumber" id="merNumber" value="<s:property value="merchantBean.merNumber"/>" style="width: 200px;" /></td>
					<td>证件号</td>
				</tr>
				<tr>
					<td height="30" align="right">联系手机 :</td>
					<td><input type="text" placeholder="联系手机" name="merPhone" id="merPhone" value="<s:property value="merchantBean.merPhone"/>" /></td>
					<td>联系手机</td>
				</tr>
				<tr>
					<td height="30" align="right">联系qq :</td>
					<td><input type="text" placeholder="联系qq" name="merQq" id="merQq" value="<s:property value="merchantBean.merQq"/>" /></td>
					<td>QQ号码</td>
				</tr>
				<tr>
					<td height="30" align="right">推荐人 :</td>
					<td><input type="text" placeholder="推荐人" name="merSource" id="merSource" value="<s:property value="merchantBean.merSource"/>" /></td>
					<td>推荐人姓名</td>
				</tr>
				<tr>
					<td height="30" align="right">联系地址 :</td>
					<td><input type="text" placeholder="联系地址" name="merAddr" id="merAddr" value="<s:property value="merchantBean.merAddr"/>" style="width: 200px;" /></td>
					<td>联系地址</td>
				</tr>
				<tr>
					<td height="30" align="right">状态 :</td>
					<td><s:radio id="merState" name="merState" list="#{'0':'停用','1':'正常'}"  value="merchantBean.merState"></s:radio></td>
					<td>是否可用</td>
				</tr>
				<tr>
					<td height="30" align="right">备注 :</td>
					<td><input type="text" placeholder="备注" name="merRemark" id="merRemark" value="<s:property value="merchantBean.merRemark"/>"  style="width: 200px;" /></td>
					<td>备注</td>
				</tr>


				<tr>
					<td></td>
					<td colspan="2"><hr /></td>
				</tr>

				<tr>
					<td height="30" align="right"></td>
					<td><input type="button" class="submit" value="提交单据" onclick="if($('#sform').valid()){$('#sform').submit();}" /> <input type="button" class="submit" value="返回上级" onclick="history.go(-1);" /></td>
					<td></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>

